﻿using System.Collections.Generic;
using ActivateYourGlutes.Services.Model;

namespace ActivateYourGlutes.Services
{
    public interface IErrorLogProvider
    {
        /// <summary>
        /// Returns a subset of errors in the error log after checking that the accessing user has rights to do so
        /// </summary>
        IEnumerable<Error> LogItems(Account accessingAccount, int offset, int pageSize);

        /// <summary>
        /// Returns the total number of items in the error log
        /// </summary>
        int TotalLogItems();

        /// <summary>
        /// Clears the error log
        /// </summary>
        void Clear(Account deletingAccount);

        /// <summary>
        /// Deletes the specified error log item
        /// </summary>
        void Delete(Account deletingAccount, int errorLogItemId);

        /// <summary>
        /// Return a single error log item by ID
        /// </summary>
        Error GetLogItemById(Account accessingAccount, int id);
    }
}
